home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c,comp.std.c
- Path: phcoms4.seri.philips.nl!panther!baynes
- From: baynes@ukpsshp1.serigate.philips.nl (Stephen Baynes)
- Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
- Sender: news@ukpsshp1.serigate.philips.nl (account for localnews)
- Message-ID: <DLzK76.88@ukpsshp1.serigate.philips.nl>
- Date: Tue, 30 Jan 1996 08:42:42 GMT
- References: <30C40F77.53B5@swsbbs.com> <DLtABq.Fzu@mv.mv.com> <4edqh2$rvl@solutions.solon.com> <KANZE.96Jan29121956@slsvewt.lts.sel.alcatel.de> <4eindq$eju@solutions.solon.com>
- Organization: Philips Semiconductors, Southampton, UK
- X-Newsreader: TIN [version 1.2 PL2]
- Followup-To: comp.lang.c,comp.std.c
-
- Peter Seebach (seebs@solutions.solon.com) wrote:
- : In article <KANZE.96Jan29121956@slsvewt.lts.sel.alcatel.de>,
- : James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
- : >In article <4edqh2$rvl@solutions.solon.com> seebs@solutions.solon.com
- : >(Peter Seebach) writes:
- : >In the particular case which you cite, I do *not* believe that gcc
- : >will compile the program without a diagnostic if the program is in a
- : >file called a.c. More ever, the compiler documentation definitly
- : >states that only programs in files whose names end in .c will be
- : >compiled as C. (A legal restriction, as far as I can see.)
-
- : That's an interesting question; the standard does not visibly make any
- : such requirements, but you could argue that gcc is only a conforming compiler
- : when invoked on a file ending in .c.
-
- : Yes, it would *have* to give a diagnostic for a Fortran program; nonetheless,
- : the program is *still* conforming if it is accepted. I think this is a
- : botch; the standard should probably distinguish between extensions and
- : violations.
-
- I think you need to distinguish between extensions (which a conformant compiler
- must give a diagnostic) and parts of the magic incantations needed to run the
- compiler (in ansi mode). Nameing a file to end '.c' is an incantation
- along with -strict or -Aa. If you get it wrong you it is up to the implementor.
- However if having perfomed the correct incantation - if the compiler fails
- to give a diagnostic required by the standard then that is a bug in the
- compiler - even if it then goes on to generate useful code. The whole point
- about a standard compiler is that if code compiles clean on one, it should
- compile clean on all.
-
-
-
- : >Yes and no. In comp.std.c, the discussion is exactly about what is
- : >legal according to the standard. In comp.lang.c (to which this
- : >article is also cross-posted), the discussion should generally be a
- : >bit more open.
-
- : It's debated. Generally, questions about features of specific compilers or
- : OS's are off-topic, even when they relate to conforming programs. Only
- : strictly conforming programs (or attempts at such, when people are asking
- : questions) are going to be usable and testable by the whole readership.
- : (I doubt you can find a single extension that works on *all* machines
- : we use.)
-
- I would regard it as reasonable in comp.std.c to also to permit occasional
- discussion on other well defined and reasonably well known standards in
- their impact on how one can use the C language. The only standards I can think
- of at the moment are POSIX/XOPEN, IEEE floating point and the one that came
- up last year to do with arithmetic (the name of which I have forgotton).
-
-
- --
- Stephen Baynes baynes@mulsoc2.serigate.philips.nl
- Philips Semiconductors Ltd
- Southampton My views are my own.
- United Kingdom
-